import request from '@/utils/requestOverTime'
import Qs from 'qs'

//文件导入
export function addEquipmentExcel (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/equipment/addEquipmentExcel',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
// 文件模板下载
export function downLoadExcel (params) {
  return request({
    params, 
    url: '/back/equipment/downLoadExcel?fileName=代理商-新增设备模板'
  })
}
//获取套餐详情
export function getEquipmentMeal (params) {
  return request({
    params, 
    url: '/back/equipmentMeal/get'
  })
}
//添加套餐
export function addEquipmentMeal (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/equipmentMeal/add',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
//修改套餐
export function updateEquipmentExcel (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/equipmentMeal/update',
    headers:{'content-type': 'application/json'}
  })
}
//批量修改套餐
export function addOrUpdateList (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/equipmentMeal/addOrUpdateList',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
//添加设备卡套餐
export function addEquipmentCard (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/cardType/addCardType',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
//修改设备卡套餐
export function updateEquipmentCard (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/cardType/updateCardType',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
// 批量修改设备卡套餐
export function addCardTypeList (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/cardType/addCardTypeList',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
//删除设备卡套餐
export function delEquipmentCard (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/cardType/deleteCardType',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}
//查询设备卡
export function getEquipmentCardList (params) {
  return request({
    method: 'get',
    params,
    url: '/back/cardType/getCardTypeList'
  })
}
//喇叭开关命令
export function updateTrumpet (data) {
  return request({
    method: 'post',
    data:Qs.stringify(data),
    url: '/back/equipment/updateTrumpet',
    headers:{'content-type': 'application/x-www-form-urlencoded'}
  })
}




